package com.cicd.user.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@Slf4j
@RestController
@RequestMapping("user")
public class UserController {

    @RequestMapping("{id}")
    public String findUserById(@PathVariable Integer id){
        log.info("method is {} , params is {}","findById",id);
        if(id==5){
            log.error("method is {} , params is {} , msg is {}","findById",id,"id不能为5");
            return null;
        }
        return "ID为"+id+"的用户信息";
    }
}
